1. Field
The present disclosure relates to an electronic device, and more particularly to a method for managing a memory of the electronic device.
2. Description of the Related Art
As electronic devices such as smart phones and tablet Personal Computers (PCs) have become faster and more sophisticated, users have begun using these devices to perform advanced functions, such as multimedia playback, calendar management, gaming, entertainment system remote control, and photography. With the increase in the number of functions performed by electronic devices, the amount of system memory required by the electronic devices to perform these functions has also increased. When the amount of memory required is not available, the operation of the electronic devices may suffer.
To prevent the operation of electronic devices from suffering, techniques for securing additional memory space are often utilized. For example, when the main memory of an electronic device is full, some of the data stored in the main memory may be moved to a swap space provided by a sub-memory. When corresponding data are requested, the main processor of the electronic device may transfer the corresponding data from the sub-memory to the main memory and then serve the request from the main memory. The function of transferring data between the system memory and the sub-memory can be referred to as a swap function.
However, there is at least one disadvantage associated with the use of swap functions. Due to limitations in the technology used to implement sub-memory modules, the number of times data can be read or written to a sub-memory module may be limited. Accordingly, when an electronic device uses a swap function frequently, the electronic device may prematurely exhaust the life of its sub-memory and cause it to malfunction. Such malfunction of the sub-memory may in turn cause the electronic device to stop operating correctly.
Therefore, the need exits for swapping techniques that efficiently utilize sub-memory modules of electronic devices, so as to prolong the life of the sub-memory modules and/or their respective electronic devices.